Skip to content

Conversation

@devanshjainms
Copy link
Contributor

This pull request enhances the parsing and validation of global.ini configuration sections for SAP HANA high-availability providers. The changes introduce support for multiple provider sections (such as ha_dr_provider_SAPHanaSR, ha_dr_provider_suschksrv, and trace sections), update the constants and test data to reflect these new sections, and expand test coverage to ensure correct handling of multiple sections and parameters.

Global INI section and provider support:

  • Updated the _parse_global_ini_parameters method in get_pcmk_properties_db.py to dynamically parse multiple provider and trace sections from global.ini, instead of hardcoding section names. It now iterates over all defined sections in the constants and extracts their parameters, logging warnings if a section is missing.

  • Expanded the GLOBAL_INI constants in constants.yaml to include new provider sections (ha_dr_provider_SAPHanaSR, ha_dr_provider_suschksrv, ha_dr_provider_sushanasr) and trace parameters for both SUSE and REDHAT platforms. This allows for more flexible and accurate validation of different provider configurations. [1] [2] [3] [4]

Test data and coverage improvements:

  • Updated test fixtures and dummy data in get_pcmk_properties_db_test.py to include the new provider and trace sections, ensuring that the test data accurately reflects real-world global.ini files. [1] [2]

  • Added and expanded tests to verify that multiple provider sections are correctly detected and parsed, and that all expected parameters (including those with list values and trace parameters) are validated. This includes new tests for multiple section parsing and updated assertions for provider and execution order parameters. [1] [2] [3]

Minor improvements:

  • Updated the MockOpen test helper to track call count, which can aid in debugging and future test enhancements.

@devanshjainms devanshjainms requested a review from a team as a code owner October 21, 2025 20:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances the parsing and validation of SAP HANA global.ini configuration parameters to support multiple HA provider sections. The changes introduce dynamic section parsing instead of hardcoded section names, expand the constants to include additional provider types (SAPHanaSR, suschksrv, sushanasr) and trace parameters, and significantly expand test coverage to validate the new multi-section parsing behavior.

Key changes:

  • Dynamic parsing of multiple provider and trace sections from global.ini
  • Expanded constants to define new provider sections for both SUSE and REDHAT platforms
  • Comprehensive test coverage for multi-section parsing and parameter validation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/modules/get_pcmk_properties_db.py Refactored _parse_global_ini_parameters to dynamically iterate over all defined sections instead of hardcoding section names
src/roles/ha_db_hana/tasks/files/constants.yaml Added structured definitions for ha_dr_provider_SAPHanaSR, ha_dr_provider_suschksrv, ha_dr_provider_sushanasr, and trace sections across SUSE/REDHAT platforms
tests/modules/get_pcmk_properties_db_test.py Updated test fixtures and added new tests to verify multi-section parsing, including provider, execution order, and trace parameters
tests/modules/configuration_check_module_test.py New comprehensive test suite for ConfigurationCheckModule covering initialization, validation, parallel execution, and error handling
tests/module_utils/filesystem_collector_test.py New comprehensive test suite for FileSystemCollector covering LVM parsing, Azure disk correlation, and NFS storage integration

hdamecharla
hdamecharla previously approved these changes Oct 22, 2025
Copy link
Member

@hdamecharla hdamecharla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

…ts and improve validation checks; add tests for missing and nested properties.
Copy link
Member

@hdamecharla hdamecharla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@devanshjainms devanshjainms merged commit f4561b5 into Azure:development-oct-2025 Oct 23, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants